package org.chen.mapper.old;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.chen.model.CommentTask;

import java.util.List;

@Mapper
public interface OldCommentTaskMapper extends BaseMapper<CommentTask> {

    /**
     * 随机抽样查询
     */
    @Select("SELECT * FROM comment_task ORDER BY RAND() LIMIT #{sampleSize}")
    List<CommentTask> selectRandomSample(@Param("sampleSize") int sampleSize);

}
